package com.xq.springboot.exception;

import com.xq.springboot.enums.ResultEnum;

/**
 * Girl实体类相关的自定义异常.主要添加了错误码
 *
 * @author 郭凯强
 */
public class GirlException extends RuntimeException {
	/**
	 * GirlException序列化号
	 */
	private static final long serialVersionUID = 7869015423481816601L;
	private Integer errorCode;

	public GirlException(ResultEnum resultEnum) {
		super(resultEnum.getMessage());
		this.errorCode = resultEnum.getErrorCode();
	}

	public Integer getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(Integer errorCode) {
		this.errorCode = errorCode;
	}

}
